package com.youme.model

import com.google.gson.annotations.SerializedName
import com.youme.model.param.ParamAddress

/**
 * Time:3/18/21 10:05 PM
 * Author:
 * Description:
 */
open class Direct<T>(
    @SerializedName("code") val code: Int = 0,
    @SerializedName("msg") val msg: String = "",
    @SerializedName("data") val data: T
)

class LoginDirect(token: String) : Direct<String>(data = token)

class ProfileDirect(profile: Profile) : Direct<Profile>(data = profile)

class FoodList(addFood: List<FoodAdd>) : Direct<List<FoodAdd>>(data = addFood)

class AddressDirect(paramAddress: ParamAddress) : Direct<ParamAddress>(data = paramAddress)

class ListAddressDirect(paramAddresses: List<ParamAddress>) : Direct<List<ParamAddress>>(data = paramAddresses)

class ListRestDirect(rest: List<Rest>) : Direct<List<Rest>>(data = rest)

class ProductsDirect(productDetail: ProductDetail) : Direct<ProductDetail>(data = productDetail)

class ListOrderDirect(data: List<Order>) : Direct<List<Order>>(data = data)

class StringDirect(content: String) : Direct<String>(data = content)

class ListRoom(room: List<Room>) : Direct<List<Room>>(data = room)

class ListFood(food: List<Food>) : Direct<List<Food>>(data = food)

class CreatOrder(orderid: List<String>) : Direct<List<String>>(data = orderid)

typealias DirectNone = Direct<Unit>


